package com.lapelittle.framework.model.page;

import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Map;
import java.util.HashMap;

@Schema(description = "基础查询条件")
public class BaseQuery extends PageRequest {
    
    @Schema(description = "搜索关键字")
    private String keyword;
    
    @Schema(description = "开始时间")
    private String startTime;
    
    @Schema(description = "结束时间")
    private String endTime;
    
    @Schema(description = "状态")
    private String status;
    
    @Schema(description = "扩展参数")
    private Map<String, Object> params;
    
    public String getKeyword() {
        return keyword;
    }
    
    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }
    
    public String getStartTime() {
        return startTime;
    }
    
    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }
    
    public String getEndTime() {
        return endTime;
    }
    
    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
    
    public String getStatus() {
        return status;
    }
    
    public void setStatus(String status) {
        this.status = status;
    }
    
    public Map<String, Object> getParams() {
        if (params == null) {
            params = new HashMap<>();
        }
        return params;
    }
    
    public void setParams(Map<String, Object> params) {
        this.params = params;
    }
    
    public void addParam(String key, Object value) {
        getParams().put(key, value);
    }
}